package com.jt9003.service.impl;

import com.jt9003.dao.User1Mapper;
import com.jt9003.pojo.User1;
import com.jt9003.service.User1Service;
import org.apache.catalina.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class User1ServiceImpl implements User1Service {
    @Resource
    private User1Mapper user1Mapper;

    @Override
    public int insertUser(User1 user1) {
        int i=user1Mapper.insertUser(user1);
        return i;
    }

    @Override
    public int deleteUserById(int uId) {
        int i=user1Mapper.deleteUserById(uId);
        return i;
    }

    @Override
    public int deleteUsersById(List<Integer> idList) {
        int i=user1Mapper.deleteUsersById(idList);
        return i;
    }

    @Override
    public int updateUserById(User1 user1) {
        int i=user1Mapper.updateUserById(user1);
        return i;
    }

    @Override
    public int updateUserStateById(User1 user1) {
        int i=user1Mapper.updateUserStateById(user1);
        return i;
    }

    @Override
    public int updateUserQuitDateByState(User1 user1) {
        int i=user1Mapper.updateUserQuitDateByState(user1);
        return i;
    }

    @Override
    public int updateUserAuthorityById(User1 user1) {
        int i=user1Mapper.updateUserAuthorityById(user1);
        return i;
    }

    @Override
    public int updateUserQuitDateById(User1 user1) {
        int i=user1Mapper.updateUserQuitDateById(user1);
        return i;
    }

    @Override
    public User1 selectUserByLoginNameAndPwd(String uLoginName, String uPassword) {
    User1 i=user1Mapper.selectUserByLoginNameAndPwd(uLoginName, uPassword);
        System.out.println(i);
        return i;
    }

    @Override
    public List<User1> selectUserByNameOrPinyinInitials(String uLoginName, Integer start, Integer limit) {
        List<User1> i=user1Mapper.selectUserByNameOrPinyinInitials(uLoginName, start, limit);
        return i;
    }

    @Override
    public int getUsersCountByResult(String uLoginName) {
        int i=user1Mapper.getUsersCountByResult(uLoginName);
        return i;
    }

    @Override
    public List<User1> selectUsersList(Integer start, Integer limit) {
        List<User1> i=user1Mapper.selectUsersList(start, limit);
        return i;
    }

    @Override
    public User1 selectUserAuthorityById(int uId) {
        User1 i=user1Mapper.selectUserAuthorityById(uId);
        return i;
    }

    @Override
    public User1 selectUserById(int uId) {
        User1 i=user1Mapper.selectUserById(uId);
        return i;
    }

    @Override
    public User1 selectUserAuthorityByuLoginName(String uLoginName) {
        User1 i=user1Mapper.selectUserAuthorityByuLoginName(uLoginName);
        return i;
    }

    @Override
    public int getUsersCount() {
        int i=user1Mapper.getUsersCount();
        return i;
    }

    @Override
    public User1 selectUserByuLoginName(String uLoginName) {
        User1 i=user1Mapper.selectUserByuLoginName(uLoginName);
        return i;
    }


}
